package com.wxcms.domain;

import com.core.domain.BaseEntity;

import java.io.UnsupportedEncodingException;

/**
 * 公会管理员
 */
public class EaspAdmin extends BaseEntity {

	private String openid;

	private byte[] nickname;//nickname
	private String nicknameStr;

	public String getOpenid() {
		return openid;
	}

	public byte[] getNickname() {
		if(this.nicknameStr != null){
			try {
				this.nickname = this.nicknameStr.getBytes("UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
		}
		return nickname;
	}
	public void setNickname(byte[] nickname) {
		this.nickname = nickname;
	}
	public String getNicknameStr() {
		if(this.getNickname() != null){
			try {
				this.nicknameStr = new String(this.getNickname(),"UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
		}
		return nicknameStr;
	}
	public void setNicknameStr(String nicknameStr) {
		this.nicknameStr = nicknameStr;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
}